home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / raypaint / Makefile.SH < prev    next >
Makefile  |  1991-08-08  |  3KB  |  129 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. #
  24. # Makefile for raypaint
  25. #
  26. # Craig Kolb
  27. #
  28. # \$Id: Makefile.SH,v 4.0 91/07/17 14:48:38 kolb Exp Locker: kolb $
  29. #
  30. # Bin directory
  31. #
  32. BINDIR = $bin 
  33. #
  34. # If you are using LINDA, add -DLINDA
  35. # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  36. # Be sure to add any necessary floating point hardware switches.
  37. OPTIMIZE = $optimize
  38. URTINC = $urtinc
  39. CCFLAGS = $ccflags $large
  40. URTLIB = $urtlib
  41. LDFLAGS = $libs $ldflags
  42. CC = $cc
  43. MKDEP = $mkdep
  44. YACC = $yacc
  45.  
  46. !GROK!THIS!
  47.  
  48. : In the following dollars and backticks do not need the extra backslash.
  49. $spitshell >>Makefile <<'!NO!SUBS!'
  50. LIBRAYDIR = ../libray
  51. LIBSHADEDIR = ../libshade
  52. INCLUDE = -I$(LIBRAYDIR) -I$(LIBSHADEDIR) -I..
  53. YFLAGS = -d
  54.  
  55. #
  56. # If using X11, use:
  57. #GRAPHICSLIB = -lX11
  58.  
  59. #
  60. # If you are using GL, use:
  61. GRAPHICSLIB = -lgl_s
  62.  
  63. LIBRAY = $(LIBRAYDIR)/libray.a
  64. LIBSHADE = $(LIBSHADEDIR)/libshade.a
  65.  
  66. CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE) -DSHARED_EDGES
  67. SHELL = /bin/sh
  68.  
  69. #
  70. # If you are using a Multimax, add -lpp
  71. # If you have a fast malloc library, use it (e.g., -lmalloc on MIPS machines)
  72. #
  73. LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)
  74.  
  75. DRIVE_C =    main.c graphics.c render.c version.c
  76.  
  77. DRIVE_O = $(DRIVE_C:.c=.o)
  78.  
  79. CFILES = $(DRIVE_C)
  80.  
  81. SHFILES = Makefile.SH
  82.  
  83. OBJ = $(DRIVE_O)
  84.  
  85. DEPENDSRC = $(DRIVE_C)
  86.  
  87. raypaint: $(OBJ) $(LIBS)
  88.     $(CC) $(OPTIMIZE) -o raypaint $(OBJ) $(LIBS) $(LDFLAGS) $(GRAPHICSLIB)
  89.  
  90. #
  91. # Uncomment the following rule if using Linda.
  92. #
  93. #raytrace.lo: raytrace.cl
  94. #    $(LCC) $(CFLAGS) -c raytrace.cl
  95.  
  96. #
  97. # End of configuration section
  98. #
  99. install:    raypaint
  100.         mv raypaint $(BINDIR)/raypaint
  101.  
  102. clean:
  103.     rm -f $(OBJ) core
  104.  
  105. realclean:
  106.     rm -f $(OBJ) core y.tab.h
  107.     rm -f *.orig Makefile
  108.  
  109. lint:
  110.     lint $(CFLAGS) -x $(CFILES) -lm
  111.  
  112. tags:
  113.     ctags -t $(CFILES)
  114.  
  115. depend:
  116.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  117.      $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
  118.     ) >Makefile.new
  119.     cp Makefile Makefile.bak
  120.     cp Makefile.new Makefile
  121.     rm -f Makefile.new
  122.  
  123.  
  124. # DO NOT DELETE THIS LINE
  125. !NO!SUBS!
  126. chmod 755 Makefile
  127. $eunicefix Makefile
  128.